/**
*  个人详情页
*  /selfdetail，无需传参
*/
<template>
  <div class="situation self-details">
    <header-top :option="headerOption"></header-top>
    <overview :userCode="userCode"></overview>
    <div class="wave">
      <img src="~assets/images/bowen@3x.png" width="100%" height="40px">
    </div>
    <chart :userCode="userCode" :clientId="userCode" :groupId="''" :entrustType="'1'" :userType="'self'"></chart>
    <div class="to-account" @click.stop.prevent="toAccount">
      <div>我的交易账户总览</div><i class="iconfont icon-xiangyou"></i>
    </div>
    <div class="create-group" @click.stop.prevent="toBuildGroup">
      <i class="iconfont icon-jiahao"></i>&nbsp;&nbsp;创建新组合
    </div>
    <a class="handbook" href="javascript:;" @click="toGroupIntro">
      <i class="iconfont icon-wenhao"></i><span>什么是组合?</span>
    </a>
    <other :userCode="userCode"></other>
    <div class="blank-60h"></div>
    <foot-btn :userCode="userCode"></foot-btn>

    <subscribe-price-modal></subscribe-price-modal>
    <relive-modal></relive-modal>
  </div>
</template>

<script>
  import RemoteDAO from 'common/remoteDAO'
  import CommonUtil from 'common/common.util'
  import LocalDAO from 'common/localDAO'
  import Constant from 'common/constant'
  import HeaderTop from 'components/HeaderTop'
  import OverView from 'components/dynamic/selfdetail/OverView'
  import Chart from 'components/Chart'
  import Other from 'components/dynamic/selfdetail/Other'
  import FootBtn from 'components/dynamic/selfdetail/FootBtn'
  import SubscribePriceModal from 'components/modal/SubscribePriceModal'
  import ReliveModal from 'components/modal/ReliveModal'

  export default {
    data () {
      return {
        userCode: LocalDAO.getUserCode(),//用户自己的ID
        headerOption: {
          title: '牛人牛股',
          leftBtn: Constant.leftBtn.BACK,
          operations: [Constant.operation.TUTORIAL, Constant.operation.REFRESH, Constant.operation.SHARE],
          page:Constant.storage.SHARE_SELF_DETAILS
        },
        error: ''
      }
    },
    components: {
      'header-top': HeaderTop,
      'overview': OverView,
      'chart': Chart,
      'other': Other,
      'foot-btn': FootBtn,
      'subscribe-price-modal': SubscribePriceModal,
      'relive-modal':ReliveModal
    },
    created: function () {
      this.$store.dispatch('setGuide',{guideType:Constant.tutorial.JYB});
      // 更新分享页数据
      var sharePage = LocalDAO.getShareSelfDetails();
      sharePage.adDownload = {userCode: this.userCode};
      LocalDAO.setShareSelfDetails(sharePage);
    },
    methods: {
      toBuildGroup(){
        this.$router.push({path: '/buildgroup/buildstep1'})
      },
      toGroupIntro(){
        this.$router.push({path: '/groupintroduce'})
      },
      toAccount(){
        this.$router.push({path: '/selfaccount'})
      }
    }
  }
</script>

<style scoped>
  .to-account{
    width: 100%;
    height: 79px;
    line-height: 79px;
    margin-top: 9px;
    display: inline-block;
    position: relative;
    background-image: url('~~assets/images/trade/wode@2x.png');
    background-repeat: no-repeat;
    background-size: cover;
  }
  .to-account >div{
    font-size: 20px;
    font-weight: bolder;
    display: inline-block;
    color: #FFFFFF;
    margin-left: 18%;
  }
  .to-account >i{
    font-size: 25px;
    color: #FFFFFF;
    float: right;
    margin-right: 1%;
    color: #FFE063;
  }
</style>
